Skip to content

fs: add dot option to glob#63205

Open
owlstronaut wants to merge 1 commit into
nodejs:mainfrom
owlstronaut:owlstronaut/fs-glob-dot-option
Open

fs: add dot option to glob#63205
owlstronaut wants to merge 1 commit into
nodejs:mainfrom
owlstronaut:owlstronaut/fs-glob-dot-option

Conversation

@owlstronaut
Copy link
Copy Markdown

@owlstronaut owlstronaut commented May 8, 2026

Adds an opt-in dot boolean option to fs.glob(), fs.globSync(), and fsPromises.glob(). When true, * and ** patterns match basenames starting with ., and the walker descends into directories whose names start
with .. Defaults to false to preserve current behavior.

Followed up from #56321 (comment)

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 8, 2026
@owlstronaut owlstronaut force-pushed the owlstronaut/fs-glob-dot-option branch from c2482d4 to 965b503 Compare May 8, 2026 18:18
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (2b6ce13) to head (965b503).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63205      +/-   ##
==========================================
- Coverage   90.06%   90.05%   -0.01%     
==========================================
  Files         713      713              
  Lines      224942   224948       +6     
  Branches    42534    42539       +5     
==========================================
- Hits       202590   202588       -2     
+ Misses      14147    14142       -5     
- Partials     8205     8218      +13     
Files with missing lines Coverage Δ
lib/internal/fs/glob.js 91.53% <100.00%> (+0.05%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Adds an opt-in `dot` boolean option to fs.glob, fs.globSync, and
fsPromises.glob. When true, `*` and `**` patterns match basenames
that begin with `.`, and the walker descends into directories
whose names begin with `.`. Defaults to false to preserve current
behavior.

Signed-off-by: Michael Smith <[email protected]>
@owlstronaut owlstronaut force-pushed the owlstronaut/fs-glob-dot-option branch from 965b503 to 252213d Compare May 11, 2026 15:13
@owlstronaut owlstronaut mentioned this pull request May 11, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants